package com.jiuli_travel.goods_service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jiuli_travel.goods_service.model.dto.goods.PurchaseGoodsRequest;
import com.jiuli_travel.goods_service.model.dto.order.CreateOrderRequest;
import com.jiuli_travel.goods_service.model.entity.GoodsOrders;
import com.jiuli_travel.utils.Result;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jiuli
 * @since 2024-05-06
 */
public interface IGoodsOrdersService extends IService<GoodsOrders> {

    /**
     * 创建订单
     */
    void createOrder(CreateOrderRequest createOrderRequest);

    /**
     * 销毁订单
     */
    void destroyedOrder(Long orderId);

    /**
     * 查看所有订单
     */
    Result selectGoodsOrders();

    /**
     * 购买商品
     */
    Result purchaseGoods(PurchaseGoodsRequest purchaseGoodsRequest);

    /**
     * 退订
     */
    Result unsubscribe(Long orderId);

}
